#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Jul  5 20:48:43 2018
@project: 天池比赛-A股主板上市公司公告信息抽取
@group: MZH_314
@author: LHQ
"""
import os
import jieba

jieba_cache = "cache"
if not os.path.exists(jieba_cache):
    os.mkdirs(jieba_cache)

jieba.dt.tmp_dir = jieba_cache


def seg(sent):
    """分词
    Args:
        sent: 字符串(句子)
        
    Returns:
        words: 分词后的词语列表
        
    """
    words = jieba.lcut(sent, cut_all=True)
    return words
